package pers.hl.lib_global.mvvm

import pers.hl.common.base.BaseModel
import pers.hl.lib_global.http.LibHttpClient
import pers.hl.lib_global.http.LibResponse

abstract class BaseLibModel: BaseModel() {

    val libService by lazy {
        LibHttpClient.getLibService()
    }

    suspend fun <T : Any> apiCall(call: suspend () -> LibResponse<T>) : LibResponse<T> {
        return call.invoke()
    }

}